package hxs.events.flash.display;

import flash.display.InteractiveObject;
import flash.display.LoaderInfo;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.TextEvent;
#if flash
import flash.events.HTTPStatusEvent;
#end
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import hxs.extras.FlashEventsStore;

import hxs.extras.FlashSignal;
import hxs.events.flash.display.DisplayObjectEvents;
import hxs.events.flash.events.EventDispatcherEvents;

/**
 * ...
 * @author Tony Polinelli
 */

class LoaderInfoEvents extends EventDispatcherEvents
{
	public function new(target:LoaderInfo) 
	{
		super(target);
	}
	
	public static function getEvents(target:LoaderInfo):LoaderInfoEvents
	{
		return cast FlashEventsStore.getEvents(target);
	}
	
	/* CLICK */
	
	public var complete(getComplete, never):FlashSignal<Event>;
	private function getComplete():FlashSignal<Event>
	{
		return cast getNativeSignal(Event.COMPLETE);
	}

	#if flash
	public var httpStatus(getHttpStatus, never):FlashSignal<HTTPStatusEvent>;
	private function getHttpStatus():FlashSignal<HTTPStatusEvent>
	{
		return cast getNativeSignal(HTTPStatusEvent.HTTP_STATUS);
	}
	#end

	public var init(getInit, never):FlashSignal<Event>;
	private function getInit():FlashSignal<Event>
	{
		return cast getNativeSignal(Event.INIT);
	}

	public var ioError(getIoError, never):FlashSignal<IOErrorEvent>;
	private function getIoError():FlashSignal<IOErrorEvent>
	{
		return cast getNativeSignal(IOErrorEvent.IO_ERROR);
	}

	public var open(getOpen, never):FlashSignal<Event>;
	private function getOpen():FlashSignal<Event>
	{
		return cast getNativeSignal(Event.OPEN);
	}

	public var progress(getProgress, never):FlashSignal<ProgressEvent>;
	private function getProgress():FlashSignal<ProgressEvent>
	{
		return cast getNativeSignal(ProgressEvent.PROGRESS);
	}

	public var unload(getUnload, never):FlashSignal<Event>;
	private function getUnload():FlashSignal<Event>
	{
		return cast getNativeSignal(Event.UNLOAD);
	}
	
}